package lq;

import java.util.Scanner;

public class lq2006 {
    public static void main(String[] args){
        Scanner in =new Scanner(System.in);
        int sc,cj,j,cx;
        cj=1;
        while (in.hasNext()){
            sc = in.nextInt();
            for (j=0;j<sc;j++){
                cx=in.nextInt();
                if (isPrime(cx)){
                    cj=cj*cx;
                }
            }
            System.out.println(cj);
            cj=1;
        }
    }
    private static boolean isPrime(int i){
        boolean flag= true;
        if (i%2==0){
            flag = false;
        }
        return flag;
    }
}

